package com.woniu.goods.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniu.goods.entity.Goods;
import com.woniu.goods.mapper.GoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements goodsService {

        @Autowired
        GoodsMapper goodsMapper;

    @Override
    public PageInfo<Goods> queryGoodsByPage(String ganme, Integer typeId, Integer now, Integer size) {
        PageHelper.startPage(now,size);
        List<Goods>list=goodsMapper.selectGoodsByPage(ganme,typeId);
        return new PageInfo<>(list);
    }
}
